from pathlib import Path
p = Path('F:\\python\\第1章\\供应商信息表.xlsx')
file_parent1 = p.parents[0]
file_parent2 = p.parents[1]
file_parent3 = p.parents[2]
print(file_parent1)
print(file_parent2)
print(file_parent3)
